package com.mvp.shq.washer.ui.shop.product;

import com.mvp.shq.washer.entity.result.BaseResult;
import com.mvp.shq.washer.entity.shop.ShopSpec;
import com.mvp.shq.washer.entity.shop.result.ProductResult;
import com.mvp.shq.washer.http.RxSchedulers;
import com.mvp.shq.washer.http.ShopApi;

import java.util.List;
import java.util.Map;

import io.reactivex.Observable;

/**
 * Created by shq1 on 2017/10/9.
 */

public class Model implements ProductConstract.Model {
    @Override
    public Observable<BaseResult<List<ShopSpec>>> getSpecByCategoryId(String categoryId) {
        return ShopApi.getInstance().service
                .getSpecByCategoryId(categoryId)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<ProductResult>> getSkuList(Map<String, String> params,int pageNo,int pageSize) {
        return ShopApi.getInstance().service
                .getSkuList(params,pageNo,pageSize)
                .compose(RxSchedulers.io_main());
    }
}
